<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>ELImageNet</title>
    <!-- load CSS -->
    <link rel="stylesheet" href="/static/css/bootstrap.min.css">                                  <!-- https://getbootstrap.com/ -->
    <link rel="stylesheet" href="/static/css/fontawesome-all.min.css">                <!-- https://fontawesome.com/ -->
    <link rel="stylesheet" href="/static/css/tooplate-style.css">
    <link rel="stylesheet" href="/static/css/jquery-ui.css">

    <script src="/static/js/jquery-3.3.1.min.js"></script>
    <script src="/static/js/jquery-ui.js"></script>

    <script>document.documentElement.className="js";var supportsCssVars=function(){var e,t=document.createElement("style");return t.innerHTML="root: { --tmp-var: bold; }",document.head.appendChild(t),e=!!(window.CSS&&window.CSS.supports&&window.CSS.supports("font-weight","var(--tmp-var)")),t.parentNode.removeChild(t),e};supportsCssVars()||alert("Please view this in a modern browser such as latest version of Chrome or Microsoft Edge.");</script>

    <style>
        .delete{

            width:100px;

            height:30px;

            border-radius:60%;

            position:absolute;

            top:10px;

            right:10px;

        }
    </style>

</head>

<body>
<div id="tm-bg"></div>
<div id="tm-wrap">
    <div class="tm-main-content">
        <a  onclick="logout()" style="font-size: 24px;color: white" class="delete">退出登陆</a>

        <div class="container tm-site-header-container">
            <div class="row">
                <div class="col-sm-12 col-md-6 col-lg-6 col-md-col-xl-6 mb-md-0 mb-sm-4 mb-4 tm-site-header-col">
                    <div class="tm-site-header">
                        <h1 class="mb-4">Eloancn AI平台</h1>
                        <img src="/static/img/underline.png" class="img-fluid mb-4">
                        <p>基于Keras+Tensorflow搭建，提供ResNet50神经网络的图片分类平台。</p>
                    </div>
                </div>

                <div class="col-sm-12 col-md-6 col-lg-6 col-xl-6">
                    <div class="content">
                        <div class="grid">
                            <div class="grid__item" id="home-link">
                                <div class="product">
                                    <div class="tm-nav-link">
                                        <i class="fas fa-th fa-3x tm-nav-icon"></i>
                                        <span class="tm-nav-text">Home</span>
                                        <div class="product__bg"></div>
                                    </div>
                                    <div class="product__description">

                                        <div> <iframe id="frame_class_show" style="width: 100%;height: 500px" frameborder="no" border="0" marginwidth="0" marginheight="0" allowtransparency="yes" src="/ai/class/getall"></iframe></div>
                                    </div>
                                </div>
                            </div>

                            <div class="grid__item" id="team-link">
                                <div class="product">
                                    <div class="tm-nav-link">
                                        <i class="fas fa-random fa-3x tm-nav-icon"></i>
                                        <span class="tm-nav-text">ReTrain</span>
                                        <div class="product__bg"></div>
                                    </div>
                                    <div class="product__description">
                                        <div class="p-sm-4 p-2">
                                            <div class="row mb-3">
                                                <div class="col-12">
                                                    <h2 class="tm-page-title">Background of Tensorflow</h2>
                                                </div>
                                            </div>
                                            <div class="row tm-reverse-sm">
                                                <div class="col-sm-12 col-md-8 col-lg-8 col-xl-8">
                                                    <p class="mb-4">您如果确定需要重新训练，请点击重新训练按钮，稍后片刻，您会收到训练成功的消息，届时，您将看到新的训练结果。训练过程请在<a href="http://192.168.2.170:6006/">TensorBoard界面</a>查看</p>

                                                    <button id="ai_retrian" onclick="retain()" class="btn btn-primary tm-btn-submit">重新训练</button>
                                                    <div id="ai_retrain_txt" style="color:green"></div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="grid__item">
                                <div class="product">
                                    <div class="tm-nav-link">
                                        <i class="fas fa-comments fa-3x tm-nav-icon"></i>
                                        <span class="tm-nav-text">Contact</span>
                                        <div class="product__bg"></div>
                                    </div>
                                    <div class="product__description">
                                        <div class="pt-sm-4 pb-sm-4 pl-sm-5 pr-sm-5 pt-2 pb-2 pl-3 pr-3">
                                            <div class="row mb-3">
                                                <div class="col-12">
                                                    <h2 class="tm-page-title">Contact Us</h2>
                                                </div>
                                            </div>
                                            <div class="row mb-4">
                                                <div class="col-12">
                                                    <p>欢迎您联系我：</p>
                                                    <p>Email：xushu@eloancn.com</p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div> <!-- .tm-main-content -->
</div>


<!-- load JS -->
      <!-- https://jquery.com/ --> <!-- http://kenwheeler.github.io/slick/ -->
<script src="/static/js/anime.min.js"></script>                     <!-- http://animejs.com/ -->
<script src="/static/js/main.js"></script>
<script>

    function setupFooter() {
        var pageHeight = $('.tm-site-header-container').height() + $('footer').height() + 100;

        var main = $('.tm-main-content');

        if($(window).height() < pageHeight) {
            main.addClass('tm-footer-relative');
        }
        else {
            main.removeClass('tm-footer-relative');
        }
    }

    /* DOM is ready
     ------------------------------------------------*/
    $(function(){

        setupFooter();

        $(window).resize(function(){
            setupFooter();
        });

        $('.tm-current-year').text(new Date().getFullYear());  // Update year in copyright
    });

    function retain(){
        alert("开始训练，请稍后…………");
        $.get("/ai/train",function(data,status){
            alert("训练成功，可以开始使用新的模型！");
        });
    }

    function logout(){
        $.get("/logout",function(data,status){
            window.location.href='/login';
        });
    }

</script>

</body>
</html>
